1. Field of the Invention
The present invention relates to a pixel interpolating apparatus and pixel interpolating method for interpolating color components lacking in a pixel for image data having only one color component for each pixel.
2. Description of the Background Art
In a digital camera, incident light from a subject is focused after passing through an optical system such as lens, an optical filter and the like, and detected at an image pickup sensor such as CCD sensor or CMOS sensor and subjected to photoelectric conversion to be finally outputted as raw image data. In general, incident light entered into an image pickup sensor passes through a color filter array where each pixel is colored prior to being subjected to photoelectric conversion. The color filter array generally includes color filters of three primary colors of R (red), G (green) and B (blue) or of complementary colors such as Y (yellow), M (magenta), G (green), C (cyan) and the like which are arranged in accordance with a predetermined rule. In the case of a single-plate image pickup sensor with a color filter array, only one color filter of one color is formed for each pixel, so that the image pickup sensor outputs raw image data where each pixel has only one color component. Since that raw image data cannot be displayed on a display monitor as it is, it is necessary to perform a pixel interpolation process for interpolating color components lacking in each pixel in the raw image data while referring to color components of surrounding pixels.
FIGS. 7 and 8 are schematic views showing examples of raw image data 100 and 110 wherein each color component is arrayed in matrix in conformance with the color filter array. FIG. 7 shows the raw image data 100 which is obtained by picking up transmitted light of a color filter array of three primary color system wherein each pixel corresponds to either one of color components of R, G and B in one-to-one correspondence. A color component array of 2×2 pixel region defined by the bold frame 101 is a basic array. On the other hand, FIG. 8 shows the raw image data 110 which is obtained by picking up transmitted light of a color filter array of complementary color system wherein each pixel corresponds to either one of color components of Y, M, G and C in one-to-one correspondence. A color component array of 2×2 pixel region defined by the bold frame 111 is a basic array.
In a pixel interpolation process, as shown in FIG. 7, for example, with respect to a current pixel at the center having only a B component, four R components and four G components in surrounding pixels are referred. Then an R component and a G component that are lacking in the current pixel are interpolated by, for example, averaging the referred color components for every color. Also the same applies to the raw image data 110 of complementary color system. As shown in FIG. 8, for example, with respect to the current pixel having only an M component, the lacking C component, G component and Y component are interpolated by referring to four C components, two G components and two Y components in the surrounding pixels. Not limited to the pixel interpolating method as described above, a variety of pixel interpolating methods are known.
However, since color components are generated while referring to surrounding pixels in the neighborhood of the current pixel, a false color that does not originally exist may occur, as well as image deterioration such as enhancement of noise components may occur. It is known that particularly in an image region of metallic material or in an image region that includes a plenty of color edges and where deviation in color is large, a false color is likely to occur. In addition, since the interpolation is performed while averaging the surrounding pixels for every color, high-frequency components representing fine patterns are liable to be removed.
It is also known that since each pixel on the image pickup sensor is regularly arranged as shown in FIGS. 7 and 8, when a fine stripe pattern or a grid pattern is picked up, surrounding pixels in the neighborhood of the current pixel interfere with each other due to the pixel interpolation process, to cause an occurrence of moiré (interference fringe).
Therefore, in order to avoid the deterioration in image quality as described above, an adaptive pixel interpolation process which detects an image pattern in the vicinity of the current pixel and changes the interpolating method in conformance with the image pattern thus detected may be performed, however, even with such a measure, complete avoidance of the above-mentioned deterioration in image quality has not realized yet. An additional problem associated with changing the interpolating method for every pixel is that a local discontinuity occurs, which may rather deteriorate the image quality.